import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryAPI } from '@/api/layout'

export const useCategoryStore = defineStore('category',() =>{
    const categoryList = ref<any>([])
    const getCategory = async () =>{
        const res:any = await getCategoryAPI()
        categoryList.value = res.result
    }
    return{
        categoryList,
        getCategory
    }
})